package ex116;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Locale;

public class Main {

	public static void main(String[] args) throws IOException {
		Locale.setDefault(Locale.ENGLISH);
		
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		int x = Integer.parseInt(in.readLine());
		double n[][] = new double[x][2];
		double sum[] = new double[x];
		String sumMessage[] = new String[x];
		String input, inputParts[];
		
		for (int i = 0; i < x; i++) {
			
			input = in.readLine();
			inputParts = input.split(" ", 2);
			
			n[i][0] = Double.parseDouble(inputParts[0]);
			n[i][1] = Double.parseDouble(inputParts[1]);
			
			if (n[i][1] != 0) {
				sum[i] = n[i][0] / n[i][1];
				sumMessage[i] = String.format("%.1f", sum[i]);				
			} else {
				sumMessage[i] = "divisao impossivel";
			}
			
		}
		
		for (int i = 0; i < sumMessage.length; i++) {
			System.out.println(sumMessage[i]);
		}
		
	}
	
}
